package com.hspedu.exception_.ClassExercise;

/**
 * @Author Stringzhua
 * @Date 2024/3/7 21:47
 * description:
 */
public class Exercise02 {
    int x;
    public static void main(String[] args) {
        int y;
        Exercise02 a = new Exercise02();
        //ArithmeticException数学运算异常
        y=3/a.x;//3/0 Exception in thread "main" java.lang.ArithmeticException: / by zero
        System.out.println("program ends ok!");
    }
}